/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Br.Com.Cds.Academia.View;

import Br.Com.Cds.Academia.Banco.BancoBean;
import Br.Com.Cds.Academia.Banco.BancoControl;
import Br.Com.Cds.Academia.DAO.AcessoMySQL;
import Br.Com.Cds.Academia.FormaPagamento.FormaPagamentoBean;
import Br.Com.Cds.Academia.FormaPagamento.FormaPagamentoControl;
import java.awt.Dimension;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumnModel;

/**
 *
 * @author p
 */
public class TelaCadastroFormasPgto extends javax.swing.JFrame {
    
    DefaultTableModel tmFormasPgto = new DefaultTableModel(null,new String[]{"Forma de Pagamento","Tipo"}); 
    ListSelectionModel lsmFormas; 
    String tipoCadastro; 
    List <FormaPagamentoBean> formas;
    List <BancoBean> bb;
    
    private void selecionaBanco(int codigoBanco){
        for(int i = 0; i < bb.size(); i++){
            if(bb.get(i).getIdbanco()== codigoBanco){
                JCBbancoformapagamento.setSelectedIndex(i);
                return;
            }
        }

    }
    
    public void mostraBanco(){
        bb = new BancoControl().listarBanco("%%");
        JCBbancoformapagamento.removeAllItems();
        for(int i = 0; i < bb.size(); i++){
            JCBbancoformapagamento.addItem(bb.get(i).getBanco());

        }
     }
    private void listarFormasPgto(){ 

        FormaPagamentoControl gru = new FormaPagamentoControl();
        formas = gru.listarFormaPagamento("%" + TFpesquisarformapagamento.getText().trim() + "%");
        mostrarFormas(formas);

    }
    
    private void mostrarFormas(List<FormaPagamentoBean> formas){ 
        if ( formas.size()==0){                        
            tmFormasPgto.setRowCount(0);
            JOptionPane.showMessageDialog(this,"Registro Não Encontrado!","CDS ACADEMIA",JOptionPane.INFORMATION_MESSAGE);
        }else{                                       
            while(tmFormasPgto.getRowCount() > 0){
                  tmFormasPgto.removeRow(0);

            }
            String[] campos = new String[] { null,null}; 
            for (int i = 0;i < formas.size(); i++){   
                tmFormasPgto.addRow(campos);               
                tmFormasPgto.setValueAt(formas.get(i).getForma(),i,0);
                tmFormasPgto.setValueAt(formas.get(i).getTipo(),i,1);
  
            }
        }

    }
    
    
    
    private void tbFormasLinhaSelecionada(JTable tb){     

        if(tb.getSelectedRow() != -1){                      
            TFdescricaoformapagamento.setText(formas.get(tb.getSelectedRow()).getForma());
            TFtaxaadministrativaformapagamento.setText(formas.get(tb.getSelectedRow()).getTaxaadm());
            String pegaAdm = formas.get(tb.getSelectedRow()).getAdministradora();
            JCBadministradoraformapagamento.setSelectedItem(pegaAdm);
            String pegaTipo = formas.get(tb.getSelectedRow()).getTipo();
            JCBtipoformapagamento.setSelectedItem(pegaTipo);
            //String pegaAg = formas.get(tb.getSelectedRow()).getAgencia();
            //JCBAgencia.set
            //String pegaConta = formas.get(tb.getSelectedRow()).getConta();
            //JCBConta.setSelectedItem(pegaConta);
            selecionaBanco(formas.get(TBtabelaformapagamento.getSelectedRow()).getIdforma());
            String pegaParcelas = formas.get(tb.getSelectedRow()).getParcelas();
            int parcelas = Integer.parseInt(pegaParcelas);
            JSPparcelasformapagamento.setValue(parcelas);
             String pegaStatus = formas.get(tb.getSelectedRow()).getStatus();
            if(pegaStatus.equals("ATIVO")){                 // COMPARA A STRING REGISTRADO NO BANCO.
               JRBAtivo.setSelected(true);
               JRBInativo.setSelected(false);
            }else if(pegaStatus.equals("INATIVO")){
               JRBAtivo.setSelected(true);
               JRBInativo.setSelected(false);
            }
            System.out.print("STATUS = "+pegaStatus);


            BTalterarcadastro.setEnabled(true);    
            BTnovocadastro.setEnabled(true);       
            BTsalvarcadastro.setEnabled(false);


       }else{ // Se não houver nenhuma linha selecionada, deixa os campos em branco.
          
            TFdescricaoformapagamento.setText("");
            JRBAtivo.setSelected(false);
            JRBInativo.setSelected(false);
            BTalterarcadastro.setEnabled(false);

       }

    }
    
    public void limpaTabela(){  
    DefaultTableModel tblRemove = (DefaultTableModel)TBtabelaformapagamento.getModel();  
      
    if (tblRemove.getRowCount() > 0){  
        for (int i=1;i<=tblRemove.getRowCount();i++){  
            tblRemove.removeRow(0);  
        }              
    }  
  
}  
          
         private JTable getJTable() {        //Metódo para definir o tamanho das colunas na JTable.
     if (TBtabelaformapagamento == null) {
         TBtabelaformapagamento = new JTable(tmFormasPgto);
         defineRenderers();
   }       return TBtabelaformapagamento;
   
 }
         
          private void defineRenderers() {
     DefaultTableCellRenderer rendererCentro = new DefaultTableCellRenderer();
     rendererCentro.setHorizontalAlignment(SwingConstants.CENTER);
     DefaultTableCellRenderer rendererDireita = new DefaultTableCellRenderer();
     rendererDireita.setHorizontalAlignment(SwingConstants.RIGHT);
     DefaultTableCellRenderer rendererEsquerda = new DefaultTableCellRenderer();
     rendererEsquerda.setHorizontalAlignment(SwingConstants.LEFT);

     JTableHeader header = TBtabelaformapagamento.getTableHeader();
     header.setPreferredSize(new Dimension(0, 35));
     TableColumnModel modeloDaColuna = TBtabelaformapagamento.getColumnModel();
     
    // Aqui se define se o texto vai ficar no meio ou nos cantos da coluna.
     
     modeloDaColuna.getColumn(0).setCellRenderer(rendererCentro); 
     modeloDaColuna.getColumn(1).setCellRenderer(rendererCentro);

   // Aqui se define o tamanho das colunas.
     
     modeloDaColuna.getColumn(0).setMaxWidth(500);
     modeloDaColuna.getColumn(1).setMaxWidth(500);

 }
          
           private void novaForma(){ // Metodo para quando clicar no botão novo, habilitar e limpar os campos

      TFdescricaoformapagamento.setText("");
      TFtaxaadministrativaformapagamento.setText("");
      JCBadministradoraformapagamento.setSelectedIndex(-1);
      JCBbancoformapagamento.setSelectedIndex(-1);
      JCBtipoformapagamento.setSelectedIndex(-1);
      JSPparcelasformapagamento.setValue(0);
      JRBAtivo.setSelected(false);
      JRBInativo.setSelected(false);
      BTalterarcadastro.setEnabled(false);
      habilitarCampos();
      
     }
    
     private void limparCampos(){

      TFdescricaoformapagamento.setText("");
      TFtaxaadministrativaformapagamento.setText("");
      JCBadministradoraformapagamento.setSelectedIndex(-1);
      JCBbancoformapagamento.setSelectedIndex(-1);
      JCBtipoformapagamento.setSelectedIndex(-1);
      JSPparcelasformapagamento.setValue(0);
      JRBAtivo.setSelected(false);
      JRBInativo.setSelected(false);
      BTalterarcadastro.setEnabled(false);
    }
     
     private boolean verificarCampos(){

        if(!TFdescricaoformapagamento.getText().trim().equals("")){
            return true;
        }
        JOptionPane.showMessageDialog(this,"INFORME O NOME DA FORMA DE PAGAMENTO !","CDS ACADEMIA",JOptionPane.WARNING_MESSAGE);
        return false;

    }
    
     private void cadastraFormaPgto(){ 

         if(verificarCampos() ){ 

            FormaPagamentoControl gc = new FormaPagamentoControl();
            FormaPagamentoBean gb = new FormaPagamentoBean();

            gb.setForma(TFdescricaoformapagamento.getText().trim());
            gb.setTaxaadm(TFtaxaadministrativaformapagamento.getText().trim());
            gb.setAdministradora(JCBadministradoraformapagamento.getSelectedItem().toString());
            gb.setBanco(JCBbancoformapagamento.getSelectedItem().toString());
            gb.setTipo(JCBtipoformapagamento.getSelectedItem().toString());
            gb.setParcelas(JSPparcelasformapagamento.getValue().toString());
            if(JRBAtivo.isSelected()){ 
            gb.setStatus("ATIVO");
            }else if(JRBInativo.isSelected()){
            gb.setStatus("INATIVO");
            }else{
            JOptionPane.showMessageDialog(null,"INFORME O STATUS!","CDS ACADEMIA",JOptionPane.WARNING_MESSAGE);
            }

            gc.cadastraFormaPagamento(gb);
            BTnovocadastro.setEnabled(true);
            limpaTabela();
            TFpesquisarformapagamento.setText("");
            JOptionPane.showMessageDialog(null,"FORMA DE PAGAMENTO CADASTRADA COM SUCESSO","MENSAGEM DO PROGRAMA",JOptionPane.INFORMATION_MESSAGE);
            desabilitarCampos();

         }
        }
     
     private void alteraFormaPgto(){

         if(verificarCampos() ){ 

            FormaPagamentoControl gc = new FormaPagamentoControl();
            FormaPagamentoBean gb = new FormaPagamentoBean();

            gb.setForma(TFdescricaoformapagamento.getText().trim());
            gb.setTaxaadm(TFtaxaadministrativaformapagamento.getText().trim());
            gb.setAdministradora(JCBadministradoraformapagamento.getSelectedItem().toString());
            gb.setBanco(JCBbancoformapagamento.getSelectedItem().toString());
            gb.setTipo(JCBtipoformapagamento.getSelectedItem().toString());
            gb.setParcelas(JSPparcelasformapagamento.getValue().toString());
            gb.setIdforma(formas.get(TBtabelaformapagamento.getSelectedRow()).getIdforma()); 
            if(JRBAtivo.isSelected()){
            gb.setStatus("ATIVO");
            }else if(JRBInativo.isSelected()){
            gb.setStatus("INATIVO");
            }else{
            JOptionPane.showMessageDialog(null,"INFORME O STATUS!","CDS ACADEMIA",JOptionPane.WARNING_MESSAGE);
            }

            gc.alterarFormaPagamento(gb);
            BTnovocadastro.setEnabled(true);
            limpaTabela();
            TFpesquisarformapagamento.setText("");
            JOptionPane.showMessageDialog(null,"FORMA DE PAGAMENTO ALTERADA COM SUCESSO","MENSAGEM DO PROGRAMA",JOptionPane.INFORMATION_MESSAGE);
            desabilitarCampos();

         }
        }
     
     private void excluirFormaPgto(){

        if(TBtabelaformapagamento.getSelectedRow() != -1){
         int resposta = JOptionPane.showConfirmDialog(this,"Excluir Registro Selecionado ?","CONFIRMAÇÂO",JOptionPane.YES_NO_OPTION);
            if(resposta == JOptionPane.YES_OPTION){
                FormaPagamentoControl gc = new FormaPagamentoControl();
                gc.excluirFormaPagamento(formas.get(TBtabelaformapagamento.getSelectedRow()).getIdforma());
                limpaTabela();
                limparCampos();
                TFpesquisarformapagamento.setText("");

            }
        }
    }
     
      private void habilitarCampos(){

     TFdescricaoformapagamento.setEditable(true);
     TFtaxaadministrativaformapagamento.setEditable(true);
     JCBadministradoraformapagamento.setEditable(true);
     JCBadministradoraformapagamento.setEnabled(true);
     JCBbancoformapagamento.setEditable(true);
     JCBbancoformapagamento.setEnabled(true);
     JCBtipoformapagamento.setEditable(true);
     JCBtipoformapagamento.setEnabled(true);
     JSPparcelasformapagamento.setEnabled(true);
     JRBAtivo.setEnabled(true);
     JRBInativo.setEnabled(true);
     
   }
     

            private void desabilitarCampos(){

     TFdescricaoformapagamento.setEditable(false);
     TFtaxaadministrativaformapagamento.setEditable(false);
     JCBadministradoraformapagamento.setEditable(false);
     JCBadministradoraformapagamento.setEnabled(false);
     JCBbancoformapagamento.setEditable(false);
     JCBbancoformapagamento.setEnabled(false);
     JCBtipoformapagamento.setEditable(false);
     JCBtipoformapagamento.setEnabled(false);
     JSPparcelasformapagamento.setEnabled(false);
     JRBAtivo.setEnabled(false);
     JRBInativo.setEnabled(false);
     
   }
            
            private void pegaAgenciaConta(){
                
            PreparedStatement pstm;
            ResultSet rs;
            String pegaAgenciaConta = "SELECT AGENCIA,CONTA FROM BANCO WHERE BANCO = ?";
            
            try{
                AcessoMySQL mysql = new AcessoMySQL();
                pstm = (PreparedStatement) mysql.conectar().prepareStatement(pegaAgenciaConta);
                String idBanco = JCBbancoformapagamento.getSelectedItem().toString();
                System.out.print("id = "+idBanco);
                pstm.setString(1,idBanco);
                rs = pstm.executeQuery();
                
                while (rs.next()){
                          
                String resultAg = rs.getString("AGENCIA");  
                String resultCC = rs.getString("CONTA");
                System.out.print(resultAg);
             }    
                
            }catch(Exception e){
             e.printStackTrace();
            }
            
            
            
                
            }

    /**
     * Creates new form TelaCadastroAluno
     */
    public TelaCadastroFormasPgto() {
        initComponents();
        defineRenderers();
        mostraBanco();
        JCBadministradoraformapagamento.setSelectedIndex(-1);
        //JCBbancoformapagamento.setSelectedIndex(-1);
        JCBtipoformapagamento.setSelectedIndex(-1);
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jTextField1 = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jToggleButton1 = new javax.swing.JToggleButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        TFpesquisarformapagamento = new javax.swing.JTextField();
        BTpesquisarformapagamento = new javax.swing.JButton();
        jLabel13 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        TFdescricaoformapagamento = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jToolBar3 = new javax.swing.JToolBar();
        jPanel7 = new javax.swing.JPanel();
        JRBAtivo = new javax.swing.JRadioButton();
        JRBInativo = new javax.swing.JRadioButton();
        JCBadministradoraformapagamento = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        JCBtipoformapagamento = new javax.swing.JComboBox();
        jLabel6 = new javax.swing.JLabel();
        JSPparcelasformapagamento = new javax.swing.JSpinner();
        jLabel7 = new javax.swing.JLabel();
        JCBbancoformapagamento = new javax.swing.JComboBox();
        jLabel10 = new javax.swing.JLabel();
        TFtaxaadministrativaformapagamento = new javax.swing.JTextField();
        jToolBar1 = new javax.swing.JToolBar();
        BTnovocadastro = new javax.swing.JButton();
        BTalterarcadastro = new javax.swing.JButton();
        BTsalvarcadastro = new javax.swing.JButton();
        BTexcluircadastro = new javax.swing.JButton();
        BTexcluircadastro2 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        TBtabelaformapagamento = new javax.swing.JTable();

        jTextField1.setText("jTextField1");

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "Foto", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 127, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 140, Short.MAX_VALUE)
        );

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        jToggleButton1.setText("jToggleButton1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("CADASTRO DE FORMAS DE PAGAMENTO");

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));

        jLabel1.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Dollar.png"))); // NOI18N
        jLabel1.setText("FORMAS DE PAGAMENTO");

        TFpesquisarformapagamento.setToolTipText("Digite a Descrição da Forma de Pagamento");

        BTpesquisarformapagamento.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N
        BTpesquisarformapagamento.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Find.png"))); // NOI18N
        BTpesquisarformapagamento.setText("Pesquisar");
        BTpesquisarformapagamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTpesquisarformapagamentoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 200, Short.MAX_VALUE)
                .addComponent(TFpesquisarformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(BTpesquisarformapagamento)
                .addGap(18, 18, 18))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TFpesquisarformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(BTpesquisarformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel13.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N

        jTabbedPane1.setBackground(new java.awt.Color(255, 255, 255));

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        TFdescricaoformapagamento.setEditable(false);
        TFdescricaoformapagamento.setToolTipText("Descrição da Forma de Pagamento");

        jLabel4.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel4.setText("BANCO:");

        jLabel18.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel18.setText("ADMINISTRADORA:");

        jToolBar3.setBackground(new java.awt.Color(255, 255, 255));
        jToolBar3.setFloatable(false);
        jToolBar3.setRollover(true);

        jPanel7.setBackground(new java.awt.Color(255, 255, 255));
        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "STATUS", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Yu Gothic", 1, 12))); // NOI18N

        JRBAtivo.setBackground(new java.awt.Color(255, 255, 255));
        JRBAtivo.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JRBAtivo.setText("ATIVO");
        JRBAtivo.setEnabled(false);
        JRBAtivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JRBAtivoActionPerformed(evt);
            }
        });

        JRBInativo.setBackground(new java.awt.Color(255, 255, 255));
        JRBInativo.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JRBInativo.setText("INATIVO");
        JRBInativo.setEnabled(false);
        JRBInativo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JRBInativoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JRBAtivo)
                    .addComponent(JRBInativo))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(JRBAtivo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JRBInativo)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        JCBadministradoraformapagamento.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JCBadministradoraformapagamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "REDE", "CIELO", "GETNET", "BANRICOMPRAS" }));
        JCBadministradoraformapagamento.setToolTipText("Administradora do Cartão");
        JCBadministradoraformapagamento.setEnabled(false);
        JCBadministradoraformapagamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JCBadministradoraformapagamentoActionPerformed(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel5.setText("TIPO:");

        JCBtipoformapagamento.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JCBtipoformapagamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "DÉBITO", "CRÉDITO", "OUTROS" }));
        JCBtipoformapagamento.setToolTipText("Tipo da Operação");
        JCBtipoformapagamento.setEnabled(false);
        JCBtipoformapagamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JCBtipoformapagamentoActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel6.setText("Nº PARC:");

        JSPparcelasformapagamento.setFont(new java.awt.Font("Yu Gothic Light", 1, 12)); // NOI18N
        JSPparcelasformapagamento.setModel(new javax.swing.SpinnerNumberModel(1, 0, 12, 1));
        JSPparcelasformapagamento.setToolTipText("Quantidade de Parcelas");

        jLabel7.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel7.setText("DESCRIÇÃO:");

        JCBbancoformapagamento.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        JCBbancoformapagamento.setToolTipText("Selecione o Banco");
        JCBbancoformapagamento.setEnabled(false);
        JCBbancoformapagamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JCBbancoformapagamentoActionPerformed(evt);
            }
        });

        jLabel10.setFont(new java.awt.Font("Yu Gothic", 1, 12)); // NOI18N
        jLabel10.setText("TX ADM %:");

        TFtaxaadministrativaformapagamento.setEditable(false);
        TFtaxaadministrativaformapagamento.setToolTipText("Taxa da Administradora");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(58, 58, 58)
                        .addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(6, 6, 6)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel18)
                                .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING))
                            .addComponent(jLabel5)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(TFdescricaoformapagamento)
                                .addComponent(JCBadministradoraformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(JCBtipoformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(JCBbancoformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel6)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(JSPparcelasformapagamento))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel10)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(TFtaxaadministrativaformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addGap(28, 28, 28)))
                .addGap(35, 35, 35))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TFdescricaoformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(JCBadministradoraformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(JSPparcelasformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)
                            .addComponent(JCBtipoformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(TFtaxaadministrativaformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(JCBbancoformapagamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))))
                .addContainerGap(24, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("FORMAS DE PAGAMENTO", jPanel3);

        jToolBar1.setBorder(null);
        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        BTnovocadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTnovocadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Add.png"))); // NOI18N
        BTnovocadastro.setText("Novo");
        BTnovocadastro.setFocusable(false);
        BTnovocadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTnovocadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        BTnovocadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTnovocadastroActionPerformed(evt);
            }
        });
        jToolBar1.add(BTnovocadastro);

        BTalterarcadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTalterarcadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Modify.png"))); // NOI18N
        BTalterarcadastro.setText("Alterar");
        BTalterarcadastro.setFocusable(false);
        BTalterarcadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTalterarcadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        BTalterarcadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTalterarcadastroActionPerformed(evt);
            }
        });
        jToolBar1.add(BTalterarcadastro);

        BTsalvarcadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTsalvarcadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Apply.png"))); // NOI18N
        BTsalvarcadastro.setText("Salvar");
        BTsalvarcadastro.setFocusable(false);
        BTsalvarcadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTsalvarcadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        BTsalvarcadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTsalvarcadastroActionPerformed(evt);
            }
        });
        jToolBar1.add(BTsalvarcadastro);

        BTexcluircadastro.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTexcluircadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/Erase.png"))); // NOI18N
        BTexcluircadastro.setText("Excluir");
        BTexcluircadastro.setFocusable(false);
        BTexcluircadastro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTexcluircadastro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        BTexcluircadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTexcluircadastroActionPerformed(evt);
            }
        });
        jToolBar1.add(BTexcluircadastro);

        BTexcluircadastro2.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        BTexcluircadastro2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/No.png"))); // NOI18N
        BTexcluircadastro2.setText("Cancelar");
        BTexcluircadastro2.setFocusable(false);
        BTexcluircadastro2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        BTexcluircadastro2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        BTexcluircadastro2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTexcluircadastro2ActionPerformed(evt);
            }
        });
        jToolBar1.add(BTexcluircadastro2);

        TBtabelaformapagamento.setFont(new java.awt.Font("Yu Gothic", 0, 12)); // NOI18N
        TBtabelaformapagamento.setModel(tmFormasPgto);
        TBtabelaformapagamento.setToolTipText("Formas de Pagamento");
        TBtabelaformapagamento.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmFormas = TBtabelaformapagamento.getSelectionModel();
        lsmFormas.addListSelectionListener(new ListSelectionListener(){
            public void valueChanged(ListSelectionEvent e){
                if(!e.getValueIsAdjusting()){
                    tbFormasLinhaSelecionada(TBtabelaformapagamento);
                }
            }
        });
        jScrollPane2.setViewportView(TBtabelaformapagamento);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 740, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabel13)
                        .addGap(152, 152, 152))))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 740, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(238, 238, 238)
                        .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(200, 200, 200)
                .addComponent(jLabel13)
                .addContainerGap())
        );

        setSize(new java.awt.Dimension(774, 466));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void JCBadministradoraformapagamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JCBadministradoraformapagamentoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_JCBadministradoraformapagamentoActionPerformed

    private void JCBtipoformapagamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JCBtipoformapagamentoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_JCBtipoformapagamentoActionPerformed

    private void JCBbancoformapagamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JCBbancoformapagamentoActionPerformed
    if(JCBbancoformapagamento.getSelectedIndex() != -1){
        pegaAgenciaConta();
    } 
    }//GEN-LAST:event_JCBbancoformapagamentoActionPerformed

    private void BTnovocadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTnovocadastroActionPerformed
    tipoCadastro = "novo"; 
    novaForma();
    JRBAtivo.setSelected(true);             // TODO add your handling code here:
    }//GEN-LAST:event_BTnovocadastroActionPerformed

    private void BTpesquisarformapagamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTpesquisarformapagamentoActionPerformed
        listarFormasPgto();
        limparCampos();
        novaForma();
        desabilitarCampos();
        BTnovocadastro.setEnabled(true);
        BTalterarcadastro.setEnabled(true);        // TODO add your handling code here:
    }//GEN-LAST:event_BTpesquisarformapagamentoActionPerformed

    private void BTsalvarcadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTsalvarcadastroActionPerformed
if(tipoCadastro.equals("novo")){
        cadastraFormaPgto();
    }else if (tipoCadastro.equals("alteracao")){
        alteraFormaPgto();
    }
        limparCampos();         // TODO add your handling code here:
    }//GEN-LAST:event_BTsalvarcadastroActionPerformed

    private void BTalterarcadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTalterarcadastroActionPerformed
 tipoCadastro = "alteracao";
 BTsalvarcadastro.setEnabled(true);
 habilitarCampos();        // TODO add your handling code here:
    }//GEN-LAST:event_BTalterarcadastroActionPerformed

    private void BTexcluircadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTexcluircadastroActionPerformed
excluirFormaPgto();        // TODO add your handling code here:
    }//GEN-LAST:event_BTexcluircadastroActionPerformed

    private void BTexcluircadastro2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTexcluircadastro2ActionPerformed
    novaForma();
    desabilitarCampos();
    BTalterarcadastro.setEnabled(true);
    BTnovocadastro.setEnabled(true);
    JRBAtivo.setSelected(false);        // TODO add your handling code here:
    }//GEN-LAST:event_BTexcluircadastro2ActionPerformed

    private void JRBAtivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JRBAtivoActionPerformed
if(JRBAtivo.isSelected()){
   JRBInativo.setSelected(false);    
    }           // TODO add your handling code here:
    }//GEN-LAST:event_JRBAtivoActionPerformed

    private void JRBInativoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JRBInativoActionPerformed
if(JRBInativo.isSelected()){
   JRBAtivo.setSelected(false);
    }        // TODO add your handling code here:
    }//GEN-LAST:event_JRBInativoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroFormasPgto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroFormasPgto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroFormasPgto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaCadastroFormasPgto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaCadastroFormasPgto().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BTalterarcadastro;
    private javax.swing.JButton BTexcluircadastro;
    private javax.swing.JButton BTexcluircadastro2;
    private javax.swing.JButton BTnovocadastro;
    private javax.swing.JButton BTpesquisarformapagamento;
    private javax.swing.JButton BTsalvarcadastro;
    private javax.swing.JComboBox JCBadministradoraformapagamento;
    private javax.swing.JComboBox JCBbancoformapagamento;
    private javax.swing.JComboBox JCBtipoformapagamento;
    private javax.swing.JRadioButton JRBAtivo;
    private javax.swing.JRadioButton JRBInativo;
    private javax.swing.JSpinner JSPparcelasformapagamento;
    private javax.swing.JTable TBtabelaformapagamento;
    private javax.swing.JTextField TFdescricaoformapagamento;
    private javax.swing.JTextField TFpesquisarformapagamento;
    private javax.swing.JTextField TFtaxaadministrativaformapagamento;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar3;
    // End of variables declaration//GEN-END:variables
}
